{template 'admin','header'}
<form action="" method="POST" onsubmit="return r_submit(this);">
    <table cellpadding="2" cellspacing="1" class="table_form">
        <caption>设置角色权限元</caption>
        <tr>
            <th width="20%"><font color="red">*</font><strong>角色名称</strong></th>
            <td>
                <label>{$info['rolename']}</label>
            </td>
        </tr>
        <tr>
            <th><strong>权限元设置</strong></th>
            <td>
                {loop $permlist $prems}
                {$prems['type']['tname']}<br/>&nbsp;&nbsp;
                    {loop $prems['perm'] $perm}
                        <input type="checkbox" name="perm[{$roleid}_{$perm['p_code']}]" value="{$perm['p_code']}" {if in_array($perm['p_code'], $perm_check)} checked {/if}>{$perm['p_name']}&nbsp;
                    {/loop}
                    <br/>
                {/loop}
            </td>
        </tr>
        <tr>
            <th></th>
            <td>
                <input type="submit" value=" 确定 " class="button_style">&nbsp;
                <input type="button" class="button_style" onclick="self.location='{urldecode($forward)}'" value=" 返回 ">
            </td>
        </tr>
    </table>
    <input type="hidden" name="roleid" value="{$info['roleid']}">
    <input type="hidden" name="dosubmit" value="dosubmit">
    <input type="hidden" name="forward" value="{$forward}">
</form>
{template 'admin','footer'}